var oTable_relatorio;

$( document ).ready( function() {
	oTable_relatorio = $('#grid_relatorio').dataTable({
        'sPaginationType' : 'full_numbers',
        "bServerSide"     : true,
        "bProcessing"     : true,
        "sAjaxSource"     : site_url + "/relatorio/ajax_buscar_relatorios",
        "sServerMethod"   : "POST",
        "iDisplayLength"  : 25,
        'bAutoWidth'      : false,
        "sScrollY"        : "auto",
        "aaSorting": [[ 1, "desc" ]],
        "sDom"            : '<"top"l>rt<"bottom"ip><"clear">',
		"fnServerParams": function ( aoData ) {

        },
		'aoColumns' : [
			{ 'sTitle' : '<div class="text-left"><input type="checkbox" name="check_all" onClick="marcar_especificado(this, \'check_iten[]\')"></div>', 'sName': 'check_iten', 'sWidth': '3%', 'bSortable': false },
            { 'sTitle' : '<div class="text-left">Cód</div>', 'sName': '', "iDataSort": 1,'sWidth': '5%' },
			{ 'sTitle' : '<div class="text-left">Nome Relatório</div>', 'sName': '', "iDataSort": 2, 'sWidth': '15%' },
			{ 'sTitle' : '<div class="text-left">Descrição</div>', 'sName': '', "iDataSort": 2, 'sWidth': '72%' },
            { 'sTitle' : '<div class="text-left">Status</div>', 'sName': '', 'sWidth': '5%', 'bSortable': true },
		]
	});
});